const app = getApp();

function getOpenId(code,success,fail){
  wx.request({
    url: this.globalData.URL + '/getOpenId',
    data: {
      code: code
    },
    success: function (res) {
      typeof successFun == 'function' && successFun(res, sourceObj);
    },
    fail: function (res) {
      typeof failFun == 'function' && failFun(res, sourceObj)
    }

  })
}
